using System;
using Churchtoolkit.Utils.BootStrapper.Configuration;

namespace Churchtoolkit.Utils.BootStrapper
{
    public class BootStrapper
    {
        public static void Run()
        {
            foreach (BootstrapperTask taskElement in BootStrapperConfigurationSection.Instance.Bootstrappers)
            {
                var taskObject = Activator.CreateInstance(taskElement.Type) as IBootstrapperTask;
                if (taskObject != null) taskObject.Execute();
            }
        }
    }
}